(function() {
	var page = pf.newPage('vehicleList');
	var $el  = null;
	var youScroll
	/**
	 * 初始化时调用
	 */
	page.onCreate = function() {
		// var vehicleList_cars=["911","Boxster","Cayenne","Cayman","Macan","panamera"];
		$el = page.$el;
	
		youScroll = new iScroll("scroller",{
		// momentum:    true,
			vScroll:    false,
			vScrollbar: false,
			hScrollbar: false,
			click:      true
		});
		$el.on('click','.cars',function(){
			var car_name = $(this).attr("car_name");
			pf.goPage("vehicle_small_List", {
				car_name: car_name,
				force:    true,
				notJump:  true
			});
		});
	};

	/**
	 * 页面显示时自动调用
	 */
	page.onShow = function() {
		var vehicleList_cars=["boxster","cayman","911","panamera","macan","cayenne"];
		// $el.show();
		youScroll.refresh();
		for (var i = 0; i <6; i++) {
			// var carName = '<div class="overview-title">'+util.wordCap(vehicleList_cars[i])+' Overview</div>';
			var carName = '<div class="overview-title">'+util.wordCap(vehicleList_cars[i])+'</div>';
			if (vehicleList_cars[i]=="911") {
				$el.find("._one_right_list").append('<div class="cars porsche_image" car_name='+vehicleList_cars[i]+' style="background-image:url(./image/stock/cars/stock_'+vehicleList_cars[i]+'_1_off.png)">'+carName+'</div>');
			}else{
				$el.find("._one_right_list").append('<div class="cars porsche_image" car_name='+vehicleList_cars[i]+' style="background-image:url(./image/stock/cars/stock_'+vehicleList_cars[i]+'_1.png)">'+carName+'</div>');
			}
		};
	};

	/**
	 * 页面隐藏时调用
	 */
	page.onHide = function() {
		// $el.hide();
		$el.find("._one_right_list").empty();
	};

})();